home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1389 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.0 KB

  1. Path: news.wichita.com!newsadm
  2. From: john@mrinc.com (John Matzen)
  3. Newsgroups: comp.lang.c++
  4. Subject: exception doesn't work with VC++ 2.2
  5. Date: Wed, 10 Jan 1996 20:06:47 GMT
  6. Organization: John's Internet Service
  7. Message-ID: <30f41b54.349574016@news.dtc.net>
  8. NNTP-Posting-Host: fourier.dtc.net
  9. X-Newsreader: Forte Agent .99c/16.141
  10.  
  11. I'm trying to update a record with the CRecordset::Update() function.
  12. When I do, the function returns FALSE and the record is not updated.
  13. I also can't seem to catch any exceptions from the function:
  14.  
  15. In the following code block:
  16.  
  17. try {
  18.     pDoc->setCustomer.Update();
  19. }
  20. catch (...) {
  21.     AfxMessageBox("An exception occured updating record.");
  22. }
  23.  
  24. the exception is not caught.  Also, I've tried numerous variations of
  25. this with try, and TRY, and catching specific exceptions and nothing
  26. works.  I have no idea why my record is not getting updated.
  27.  
  28. Any ideas?
  29.  
  30. setCustomer is a CCustomerset which is derived from CRecordset.   set
  31. Customer is in my document (pDoc) and is being called from a
  32. CFormView.
  33.  
  34. Thanks,
  35.  
  36. John Matzen
  37.  
  38.